/* 
 * File:   relation.h
 * Author: ossi
 *
 * Created on October 29, 2011, 8:50 PM
 */

#ifndef RELATION_H
#define	RELATION_H

typedef enum rel_type {
    REL_CHILD, REL_MARRIAGE, REL_OTHER, REL_INVALID_VALUE
} rel_t;

struct person;

typedef struct relation {
    struct person *person1, *person2;
    rel_t type;
} relation;

relation* rel_new(struct person* person1, struct person* person2, rel_t type);
void rel_free(relation* rel);
_Bool rel_equals(void* relation1, void* relation2);
rel_t int_to_relt(const int i);
int relt_to_int(const rel_t i);
#endif	/* RELATION_H */

